<!DOCTYPE html>
<html>
<head>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" autoFlush="false" buffer="300kb"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>湛江潜校</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
	name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet"
	href="<c:url value="/bootstrap/css/bootstrap.min.css"/>" />
<!-- Font Awesome -->
<link rel="stylesheet"
	href="<c:url value="/dist/css/font-awesome.min.css"/>" />
<!-- Ionicons -->
<link rel="stylesheet"
	href="<c:url value="/dist/css/ionicons.min.css"/>" />
<!-- Theme style -->
<link rel="stylesheet"
	href="<c:url value="/dist/css/AdminLTE.min.css"/>" />
<!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet"
	href="<c:url value="/dist/css/skins/_all-skins.min.css"/>" />
<!-- iCheck -->
<link rel="stylesheet"
	href="<c:url value="/plugins/iCheck/flat/blue.css"/>" />
<!-- Morris chart -->
<link rel="stylesheet"
	href="<c:url value="/plugins/morris/morris.css"/>" />
<!-- jvectormap -->
<link rel="stylesheet"
	href="<c:url value="/plugins/jvectormap/jquery-jvectormap-1.2.2.css"/>" />
<!-- Date Picker -->
<link rel="stylesheet"
	href="<c:url value="/plugins/datepicker/datepicker3.css"/>" />
<!-- Daterange picker -->
<link rel="stylesheet"
	href="<c:url value="/plugins/daterangepicker/daterangepicker-bs3.css"/>" />
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet"
	href="<c:url value="/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"/>" />

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
        <script src="<c:url value="/dist/js/html5shiv.min.js"/>"></script>
        <script src="<c:url value="/dist/js/respond.min.js"/>"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
	<div class="wrapper">

		<header class="main-header">
			<!-- Logo -->
			<a href="../index.html" class="logo"> <!-- mini logo for sidebar mini 50x50 pixels -->
				<span class="logo-mini"><b>ZJ</b>QX</span> <!-- logo for regular state and mobile devices -->
				<span class="logo-lg"><b>湛江</b>潜校</span>
			</a>
			<!-- Header Navbar: style can be found in header.less -->
			<nav class="navbar navbar-static-top" role="navigation">
				<!-- Sidebar toggle button-->
				<a href="#" class="sidebar-toggle" data-toggle="offcanvas"
					role="button"> <span class="sr-only">Toggle navigation</span>
				</a>
			</nav>
		</header>
		<!-- Left side column. contains the logo and sidebar -->
		<aside class="main-sidebar">
			<!-- sidebar: style can be found in sidebar.less -->
			<section class="sidebar">
				<!-- /.search form -->
				<!-- sidebar menu: : style can be found in sidebar.less -->
				<ul class="sidebar-menu">
					<li class="header">主菜单</li>
					<!-- 药房管理员 -->
					<c:if test="${permission==3}">
						<li class="treeview"><a href="#"> <i
								class="fa fa-files-o"></i> <span>药品管理</span> <i
								class="fa fa-angle-left pull-right"></i>
						</a>
							<ul class="treeview-menu">
								<li><a href="${ctp }/drugManager/addDrug"><i
										class="fa fa-circle-o">新建药品</i></a></li>
								<li><a href="${ctp }/drugManager/getDrugList"><i
										class="fa fa-circle-o">药品列表</i></a></li>
								<li><a href="../medicine/inventoryMedicineNotice.html"><i
										class="fa fa-circle-o">库存警戒线药品</i></a></li>
								<li><a href="../medicine/expiredMedicine.html"><i
										class="fa fa-circle-o">药品报损表</i></a></li>
								<li><a href="../medicine/deliverMedicine.html"><i
										class="fa fa-circle-o">物资发放</i></a></li>
								<li><a href="../medicine/deliverList.html"><i
										class="fa fa-circle-o">物资发放列表</i></a></li>
							</ul></li>
						<li class="treeview"><a href="#"> <i
								class="fa fa-files-o"></i> <span> 缴费管理</span> <i
								class="fa fa-angle-left pull-right"></i>
						</a>
							<ul class="treeview-menu">
								<li><a href="../pay/registeredList.html"><i
										class="fa fa-circle-o">挂号</i></a></li>
								<li><a href="../pay/payList.html"><i
										class="fa fa-circle-o">处方缴费</i></a></li>
								<li><a href="../pay/refundList.html"><i
										class="fa fa-circle-o">处方退费</i></a></li>
								<li><a href="../pay/registeredStatistics.html"><i
										class="fa fa-circle-o">挂号统计</i></a></li>
								<li><a href="../pay/paymentStatistics.html"><i
										class="fa fa-circle-o">缴费统计</i></a></li>
								<li><a href="../pay/refundStatistics.html"><i
										class="fa fa-circle-o">退费统计</i></a></li>
							</ul></li>
						<li class="treeview"><a href="#"> <i
								class="fa fa-dashboard"></i> <span>医疗卡管理</span> <i
								class="fa fa-angle-left pull-right"></i>
						</a>
							<ul class="treeview-menu">
								<li><a href="${ctp }/drugManager/addPatient"><i
										class="fa fa-circle-o"></i>新办医疗卡</a></li>
								<li><a href="${ctp }/drugManager/getPatientList"><i
										class="fa fa-circle-o"></i>医疗卡列表</a></li>
								<li><a href="../card/cardSearch.html"><i
										class="fa fa-circle-o"></i>医疗卡查询</a></li>
							</ul></li>
					</c:if>
					<!-- 医生 -->
					<c:if test="${permission==2}">
						<li class="treeview"><a href="#"> <i
								class="fa fa-files-o"></i> <span>处方管理</span> <i
								class="fa fa-angle-left pull-right"></i>
						</a>
							<ul class="treeview-menu">
								<li><a href=""><i class="fa fa-circle-o"></i>查看处方</a></li>
								<li><a href="${ctp }/doctor/addRecipe"><i
										class="fa fa-circle-o"></i>添加处方</a></li>
								<li><a href="${ctp }/doctor/getRecipeList"><i
										class="fa fa-circle-o"></i>处方列表</a></li>
							</ul></li>
					</c:if>
					<!-- 导医 -->
					<c:if test="${permission==4}">
						<li class="treeview"><a href="#"> <i
								class="fa fa-files-o"></i> <span>绩效统计</span> <i
								class="fa fa-angle-left pull-right"></i>
						</a>
							<ul class="treeview-menu">
								<li><a href="../finance/personalWorkload.html"><i
										class="fa fa-circle-o">个人工作量统计</i></a></li>
								<li><a href="../finance/performance.html"><i
										class="fa fa-circle-o">绩效统计</i></a></li>
							</ul></li>
						<li><a href="../prescription/showPrescription.html"><i
								class="fa fa-circle-o"></i>查看处方</a></li>
					</c:if>



					<!-- 超级管理员 -->
					<c:if test="${permission==5 }">
						<li class="treeview"><a href="#"> <i
								class="fa fa-files-o"></i> <span> 用户管理</span> <i
								class="fa fa-angle-left pull-right"></i>
						</a>
							<ul class="treeview-menu">
								<li><a href="${ctp }/superUser/addUser"><i
										class="fa fa-circle-o">新增用户</i></a></li>
								<li><a href="${ctp }/superUser/getUsers"><i
										class="fa fa-circle-o">用户列表</i></a></li>
							</ul></li>
						<li class="treeview"><a href="#"> <i
								class="fa fa-files-o"></i> <span> 治疗管理</span> <i
								class="fa fa-angle-left pull-right"></i>
						</a>
							<ul class="treeview-menu">
								<li><a href="${ctp }/superUser/addCureList"><i
										class="fa fa-circle-o">新建治疗项目</i></a></li>
								<li><a href="../project/addPhysicalExamination.html"><i
										class="fa fa-circle-o">新建体格诊断</i></a></li>
								<li><a href="${ctp }/superUser/getCureList"><i
										class="fa fa-circle-o">治疗项目列表</i></a></li>
								<li><a href="../project/physicalExaminationList.html"><i
										class="fa fa-circle-o">体格诊断列表</i></a></li>
							</ul></li>
					</c:if>

				</ul>
			</section>
			<!-- /.sidebar -->
		</aside>

		<!-- 主体部分 START -->

		<div class="content-wrapper">
			<section class="content">
				<div class="box box-primary">
					<div class="box-header with-border">
						<h3 class="box-title">处方清单</h3>
					</div>
					<div class="box-body">
						<table class="table table-bordered">
							<tbody>
								<tr>
									<td>病人姓名：</td>
									<td>${recipe.patientname }</td>
									<td>性别：</td>
									<td>${recipe.patientsex }</td>
									<td>出生日期</td>
									<td><fmt:formatDate value="${recipe.patientbirthday }"
											pattern="yyyy年MM月dd日" /></td>
								</tr>
								<tr>
									<td>医生：</td>
									<td>${recipe.username }</td>
									<td>就诊开始时间：</td>
									<td><fmt:formatDate value="${recipe.time }"
											pattern="yyyy年MM月dd日" /></td>
									<td>卡号：</td>
									<td>${recipe.cardid }</td>
								</tr>
							</tbody>
						</table>
						<div class="form-group">
							<label for="">主诉</label>
							<textarea class="form-control" rows="2" disabled="">${recipe.mainsuit }</textarea>
						</div>
						<div class="form-group">
							<label for="">体格诊断</label>
							<table class="table table-bordered" style="width: 50%;">
								<tbody>
									<c:forEach items="${recipeSignView }" var="recipeSign">
										<tr>
											<td>${recipeSign.sign }</td>
											<c:choose>
												<c:when test="${recipeSign.statue==0 }">
												<td>+</td>
												</c:when>
												<c:when test="${recipeSign.statue==1 }">
												<td>-</td>
												</c:when>
												<c:otherwise>
												<td>±</td>
												</c:otherwise>
											</c:choose>
											
										</tr>
									</c:forEach>
								</tbody>
							</table>
						</div>
						<div class="form-group">
							<label for="">现病史</label>
							<textarea class="form-control" rows="3" disabled="">${recipe.complain }</textarea>
						</div>
						<div class="box-header with-border">
							<h3 class="box-title">处方列表</h3>
						</div>
						<table class="table table-bordered" style="width: 50%;">
							<tbody>
								<tr>
									<td>用药</td>
									<td>数目</td>
								</tr>
								<c:forEach items="${useDrugView }" var="useDrug">
									<tr>
										<td>${useDrug.drugname }</td>
										<td>${useDrug.drugsum }${useDrug.type }</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>

						<table class="table table-bordered" style="width: 50%;">
							<tbody>
								<tr>
									<td>治疗项目</td>
									<td>数目</td>
									<td>已治疗次数</td>
									<td>单价（未计折扣）</td>
								</tr>
								<c:forEach items="${cureitems }" var="cureitem">
									<tr>
										<td>${cureitem.curename }</td>
										<td>${cureitem.curesum }疗程</td>
										<td>${cureitem.finishsum }</td>
										<td>${cureitem.price }元</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
						<div class="box-header with-border">
							<h3 class="box-title">治疗记录</h3>
						</div>
						<table class="table table-bordered" style="width: 50%;">
							<tbody>
								<tr>
									<td>治疗项目</td>
									<td>治疗者</td>
									<td>治疗时间</td>
									
								</tr>
								<c:forEach items="${cureProcessView }" var="cureProcess">
									<tr>
										<td>${cureProcess.curename }</td>
										<td>${cureProcess.username }</td>
										<td><fmt:formatDate value="${cureProcess.date }"
												pattern="yyyy年MM月dd日" /></td>
									
									</tr>
								</c:forEach>
							</tbody>
						</table>
						<div class="box-header with-border">
							<h3 class="box-title">退费金额</h3>
						</div>
						<!-- 不知道为什么从这里下面就读不到了 -->
							<div class="box-body">
								<form:form modelAttribute="refund" action="${ctp }/drugManager/changeIsRun" role="form">
								<div class="form-group">
									<label for="">应退费金额：</label>
								</div>
								<div class="form-group">
									<label for="">实退费金额：</label> <form:input path="amount"
										class="form-control" id="" type="text" />
										<form:hidden path="recipeid" value="${recipe.recipeid }"/>
								</div>
									<div class="box-footer">
								<a href="../prescription/prescriptionList.html"><span
									style="display: inline-block; width: 50px; text-align: center;">返回</span></a>
								<button type="submit" class="btn btn-primary btn-danger">退费</button>
							</div>
						
								</form:form>
							</div>		
					</div>
				</div>
			</section>
		</div>

		<!-- 主体部分 END -->



		<footer class="main-footer">
			<div class="pull-right hidden-xs">
				<b>Version</b> 1.0.0
			</div>
			<strong>Copyright &copy; 2015-2015 湛江潜校 .</strong> All rights
			reserved.
		</footer>

		<!-- Add the sidebar's background. This div must be placed
           immediately after the control sidebar -->
		<div class="control-sidebar-bg"></div>
	</div>
	<!-- ./wrapper -->

	<!-- jQuery 2.1.4 -->
	<script src="<c:url value="/plugins/jQuery/jQuery-2.1.4.min.js"/>"></script>
	<!-- jQuery UI 1.11.4 -->
	<script src="<c:url value="/dist/js/jquery-ui.min.js"/>"></script>
	<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
	<script>
		$.widget.bridge('uibutton', $.ui.button);
	</script>
	<!-- Bootstrap 3.3.5 -->
	<script src="<c:url value="/bootstrap/js/bootstrap.min.js"/>"></script>
	<!-- Morris.js charts -->
	<script src="<c:url value="/dist/js/raphael-min.js"/>"></script>
	<script src="<c:url value="/plugins/morris/morris.min.js"/>"></script>
	<!-- Sparkline -->
	<script
		src="<c:url value="/plugins/sparkline/jquery.sparkline.min.js"/>"></script>
	<!-- jvectormap -->
	<script
		src="<c:url value="/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"/>"></script>
	<script
		src="<c:url value="/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"/>"></script>
	<!-- jQuery Knob Chart -->
	<script src="<c:url value="/plugins/knob/jquery.knob.js"/>"></script>
	<!-- daterangepicker -->
	<script src="<c:url value="/dist/js/moment.min.js"/>"></script>
	<script
		src="<c:url value="/plugins/daterangepicker/daterangepicker.js"/>"></script>
	<!-- datepicker -->
	<script
		src="<c:url value="/plugins/datepicker/bootstrap-datepicker.js"/>"></script>
	<!-- Bootstrap WYSIHTML5 -->
	<script
		src="<c:url value="/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"/>"></script>
	<!-- Slimscroll -->
	<script
		src="<c:url value="/plugins/slimScroll/jquery.slimscroll.min.js"/>"></script>
	<!-- FastClick -->
	<script src="<c:url value="/plugins/fastclick/fastclick.min.js"/>"></script>
	<!-- AdminLTE App -->
	<script src="<c:url value="/dist/js/app.min.js"/>"></script>
	<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
	<script src="<c:url value="/dist/js/pages/dashboard.js"/>"></script>
	<!-- AdminLTE for demo purposes -->
	<script src="<c:url value="/dist/js/demo.js"/>"></script>
</body>
</html>
